
<%@page import="com.printeverywhere.util.AttributeConstants"%>
<%@page import="com.printeverywhere.util.SessionUtil"%>
<%@page import="com.printeverywhere.util.CommonUtil"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String affiliateLink = "registrationForm.htm?" + AttributeConstants.REFERAL + "=";
	affiliateLink += CommonUtil.encrypt(String.valueOf(SessionUtil.getUser(request).getId()));
%>

<s:set name="user" var="user" value="%{#session.user}" />


<s:set var="categoryDisplay" value="%{#attr.categoryDisplay}"></s:set>
<s:if test="%{categoryDisplay==null}">
<s:set var="categoryDisplay" value="false" ></s:set>
</s:if>

<s:if test="%{categoryDisplay==null || !categoryDisplay}">
<div style="margin: 0px 0px 16px 0px">
	<div style="margin:0px 0px 0px 0px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="9"><img src="images/left/grey-header-left.jpg" width="9" height="41" /></td>
	    <td align="left" class="grey-header-bg"><div class="white-header-text">My Account</div></td>
	    <td width="9"><img src="images/left/grey-header-right.jpg" width="9" height="41" /></td>
	  </tr>
	</table>
	</div>
	 <div style="margin:0px 5px 0px 5px">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td rowspan="2" valign="top">
					<div style="margin: 10px 0px 0px 0px">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<a href="overview.htm" class="categories-arrow-text">Overview</a>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td><a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu11', this, 'categories-arrow-text')" onmouseout="mclosetime()">Selling</a></td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu11" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="sellAuctions.htm">Auctions <span
											style="font-weight: normal;">(2)</span> </a>
										<a href="sellFixedPrice.htm">Fixed price <span
											style="font-weight: normal;">(0)</span> </a>
										<a href="sellShops.htm">Shops <span
											style="font-weight: normal;">(0)</span> </a>
										<a href="sellSold.htm">Sold <span
											style="font-weight: normal;">(0)</span> </a>
										<a href="sellNotSold.htm">Not sold <span
											style="font-weight: normal;">(35)</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu21', this, 'categories-arrow-text')" onmouseout="mclosetime()">Buying</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu21" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="buyWatching.htm">Watching
											<span style="font-weight: normal;">(0)</span> </a>
										<a href="buyBidding.htm">Bidding
											<span style="font-weight: normal;">(0)</span> </a>
										<a href="buyPurchase.htm">Purchased
											<span style="font-weight: normal;">(0)</span> </a>
										<a href="buyLost.htm">Lost
											<span style="font-weight: normal;">(0)</span> </a>
										<a href="buyMyOffer.htm">My
											offers <span style="font-weight: normal;">()</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu31', this, 'categories-arrow-text')" onmouseout="mclosetime()">Items wanted</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu31" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="myWanted.htm">My
											wanteds <span style="font-weight: normal;">(2)</span> </a>
										<a href="myWantedWatchingOthers.htm">Watching
											others <span style="font-weight: normal;">(0)</span> </a>
										<a href="myOffersWanted.htm">My
											offers <span style="font-weight: normal;">(6)</span> </a>
										<a href="myWantedPurchased.htm">Purchased
											<span style="font-weight: normal;">()</span> </a>
										<a href="myWantedSold.htm">Sold
											<span style="font-weight: normal;">()</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu91', this, 'categories-arrow-text')" onmouseout="mclosetime()">Tenders</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu91" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="myReverseAuction.htm">My Tenders<span style="font-weight: normal;">(2)</span> </a>
										<a href="myReverseAuctionWatching.htm">Watching
											 <span style="font-weight: normal;">(0)</span> </a>
										<a href="myReverseAuctionOffers.htm">My
											offers <span style="font-weight: normal;">(6)</span> </a>
										<a href="myReverseAuctionPurchased.htm">Purchased
											<span style="font-weight: normal;">()</span> </a>
										<a href="myReverseAuctionSold.htm">Sold
											<span style="font-weight: normal;">()</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="showFeedbackForum.htm" class="categories-arrow-text">Feedback forum</a>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu41', this, 'categories-arrow-text')" onmouseout="mclosetime()">My favorites</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu41" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="favoriteCategories.htm">Categories <span style="font-weight: normal;">(6)</span> </a>
										<a href="favoriteUsers.htm">Users <span style="font-weight: normal;">(3)</span> </a>
										<a href="favoriteSearches.htm">Searches <span style="font-weight: normal;">(4)</span> </a>
										<a href="favoriteShops.htm">Shops <span style="font-weight: normal;">(1)</span> </a>
										<a href="favoriteProfile.htm">Company profiles <span style="font-weight: normal;">(1)</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="showShop.htm" class="categories-arrow-text">Shop settings</a>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu51', this, 'categories-arrow-text')" onmouseout="mclosetime()">Money manager</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu51" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="manageCreditCard.htm"
											class="leftnav">Manage Credit Cards</a>
										<a href="manageBankAccount.htm"
											class="leftnav">Manage Bank Accounts </a>
										<a href="showPaymentActivity.htm"
											class="leftnav">Payment Activity </a>
										<a href="showTransactionsNotYetInvoiced.htm"
											class="leftnav">Transactions not yet invoiced </a>
										<a href="showMakeCreditCardDeposit.htm">Make
												credit card deposit </a>
										<a href="showMakeElectronicBankTransfer.htm">Make
												electronic bank transfer </a>
										<a href="showMakeAndCheckPayPalPayments.htm">Make and
												check PayPal payments</a>
										<a href="showInvoices.htm">Invoices</a>
										<a href="showAccountSheet.htm">Account
												sheet</a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu61', this, 'categories-arrow-text')" onmouseout="mclosetime()">Advertising</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu61" onmouseover="mcancelclosetime()"
										onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="myadvertisements.htm">My
											advertisements <span style="font-weight: normal;">(1)</span> </a>
										<a href="watchingothers.htm">Watching
											others <span style="font-weight: normal;">(0)</span> </a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu71', this, 'categories-arrow-text')" onmouseout="mclosetime()">Banner Advertising</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu71" onmouseover="mcancelclosetime()" onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="showAddNewCampaign.htm">Add New Campaign</a>
										<a href="showManageAccounts.htm">Manage Campaign</a>
										<a href="showAdvertiserReport.htm">Advertiser report</a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="crossPromotion.htm" class="categories-arrow-text">Cross promotion</a>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="blockBuyer.htm" class="categories-arrow-text">Block list</a>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="#" class="categories-arrow-text" onmouseover="mopen('dropmenu81', this, 'categories-arrow-text')" onmouseout="mclosetime()">Edit profile</a>
								</td>
							</tr>
							<tr>
								<td id="mddm">
									<div id="dropmenu81" onmouseover="mcancelclosetime()" onmouseout="mclosetime()" style="visibility: hidden;">
										<a href="editRegistrationForm.htm">Registration
											information</a>
										<a href="companyProfile.htm">Company
											profile</a>
										<a href="showAboutMe.htm">About
											me</a>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="mailto:?subject=WelCome%20to%20PrintPackPaper&body=<%=basePath + affiliateLink%>" class="categories-arrow-text">Affiliate Link</a>
								</td>
							</tr>
							<tr>
								<td>
									<div class="categories-separator-bg" style="margin: 7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
								</td>
							</tr>
							<tr>
								<td>
									<a href="showMessagingSystem.htm" class="categories-arrow-text">Messaging System</a>
								</td>
							</tr>
						</table>
					</div>
				</td>
				<td width="11" valign="top" class="left-bg">
					<div style="margin: 0px 0px 0px 0px"><img src="images/left/left-grey-top-bg.jpg" alt=" " width="11" height="170" /></div>
				</td>
			</tr>
			<tr>
				<td valign="bottom" class="left-bg">
					<div style="margin: 0px 0px 0px 0px"><img src="images/left/left-grey-bottom-bg.jpg" alt=" " width="11" height="121" /></div>
				</td>
			</tr>
		</table>
	</div>
</div>

</s:if>
<s:else>
<div style="margin:0px 0px 16px 0px">
	<div style="margin:0px 0px 0px 0px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="9"><img src="images/left/grey-header-left.jpg" width="9" height="41" /></td>
	    <td align="left" class="grey-header-bg"><div class="white-header-text"><s:text name="categories" /> : <span class="black-header-text"><s:text name="forsale" /></span></div></td>
	    <td width="9"><img src="images/left/grey-header-right.jpg" width="9" height="41" /></td>
	  </tr>
	</table>
	<div style="margin:0px 5px 0px 5px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
        	<td rowspan="2" valign="top"><div style="margin:10px 0px 0px 0px">
				<s:set name="totalCat" value="#attr.generalCategoriesLeft.size" var="totalCat" />
				<s:iterator status="rawStatus" value="#attr.generalCategoriesLeft" var="generalCategory">
                      <div><a href="subCategories.htm?cid=<s:property value="%{#generalCategory.categoryId}" />" class="categories-arrow-text" ><s:property value="%{#generalCategory.categoryName}" /> (<s:property value="%{#rawStatus.index}" />)</a></div>
                	<s:if test="%{#rawStatus.index != #totalCat - 1}">
                      <div class="categories-separator-bg" style="margin:7px 0px 7px 0px"><img src="images/framework/blank.gif" alt=" " /></div>
                    </s:if>
                </s:iterator>
			</div></td>
            <td width="11" valign="top" class="left-bg"><div style="margin:0px 0px 0px 0px"><img src="images/left/left-grey-top-bg.jpg" alt=" " width="11" height="170" /></div></td>
		</tr>
        <tr>
        	<td valign="bottom" class="left-bg"><div style="margin:0px 0px 0px 0px"><img src="images/left/left-grey-bottom-bg.jpg" alt=" " width="11" height="121" /></div></td>
		</tr>
	</table>
	</div>
</div>
</s:else>